package com.appistry.storage.domain.impl;


// Notes/Thoughts

// right now when we get the fileListWithMetaData it returns
// all the metaData for each worker that knows about the file.
// I was expecting more of a file-centric solution where we
// just get the file's metadata... one instance/copy

//TODO - fileMetaData.addWorkerFileMetaDataEntry(ip,workerFileMetaData);
// fileMetaData should be a map, with the ip as the key to
// the workers meta data, also we should be able to ask it to give us
// the latest version of the workermetaData... so to get the lastest version
// of the file meta data we would so something like
//
// if ( ! fileMetaData.isConflicted() )
// {
//  	WorkerFileMetaData latestMeta = fileMetaData.getLatestVersionOfMetaData();
//		Date modDate = latestMeta.getModifiedTime();
// }
//
// could even have a isConflicted() method, which would check all the metadata
// for a conflict....


public class FileMetaDataImplOLD {
//	private List<WorkerFileMetaData> workerFileMetaDataList = new ArrayList<WorkerFileMetaData>();
//
//	public void addWorkerFileMetaDataEntry(WorkerFileMetaData entry) {
//		workerFileMetaDataList.add(entry);
//	}
//
//	public Date getCreateTime() {
//		verifyWorkerFileMetaData();
//		return workerFileMetaDataList.get(0).getCreateTime();
//	}
//
//	public int getMinReadCopies() {
//		verifyWorkerFileMetaData();
//		return workerFileMetaDataList.get(0).getMinReadCopies();
//	}
//
//	public int getMinWriteCopies() {
//		verifyWorkerFileMetaData();
//		return workerFileMetaDataList.get(0).getMinWriteCopies();
//	}
//
//	public Date getModifiedTime() {
//		verifyWorkerFileMetaData();
//		return workerFileMetaDataList.get(0).getModifiedTime();
//	}
//
//	public int getNumCopies() {
//		verifyWorkerFileMetaData();
//		return workerFileMetaDataList.get(0).getNumCopies();
//	}
//
//	public long getSize() {
//		verifyWorkerFileMetaData();
//		return workerFileMetaDataList.get(0).getSize();
//	}
//
//	public boolean isDeleted() {
//		verifyWorkerFileMetaData();
//		return workerFileMetaDataList.get(0).isDeleted();
//	}
//
//	public List<WorkerFileMetaData> getWorkerFileMetaData() {
//		return workerFileMetaDataList;
//	}
//
//	private void verifyWorkerFileMetaData() {
//		if (workerFileMetaDataList.size() == 0) {
//			throw new RuntimeException("WorkerFileMetaDataList size is 0! Unable to get any file metadata!");
//		}
//	}

	
}
